package com.netrust.quarz.task;


import org.apache.commons.lang3.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;


import com.netrust.quarz.service.BulidAlarmRealService;

/**
 * 定时生成允许建议所需要的源数据
 * @author visitor
 *
 */
@Component  
@Configurable
@EnableScheduling
public class BulidAlarmRealTask implements ITask{
	
	private static final Logger log = LoggerFactory.getLogger(BulidAlarmRealTask.class);

	@Autowired
	BulidAlarmRealService bulidAlarmRealService;
	
	
	@Override
	public void init() {
		try {
			bulidAlarmRealService.run();
		} catch (Exception e) {
			log.error(ExceptionUtils.getStackTrace(e));
		}
	}
	
}
